Some image capture devices use phase difference detection sensors (which may also be referred to as “pixels”) to perform autofocus. On-sensor phase difference detection works by interspersing phase difference detection pixels between imaging pixels, typically arranged in repeating sparse patterns of left and right pixels. The system detects phase differences between signals generated by different phase difference detection pixels, for example between a left pixel and a nearby right pixel. The detected phase differences can be used to perform autofocus.
Phase detection autofocus operates faster than contrast-based autofocus, however current implementations place a metal mask over the image sensor to create left and right phase detection pixels, resulting in less light reaching the masked pixels. Typical imaging sensors have a microlens formed over each individual pixel to focus light onto each pixel, and the phase detection autofocus mask placed over the microlenses reduces the light entering the microlens of a phase detection pixel by about 50%. Because the output of phase detection pixels has lower brightness than the output of normal image capturing pixels, the phase difference detection pixels create noticeable artifacts in captured images that require correction. By placing the phase detection pixels individually amidst imaging pixels, the system can interpolate values for the phase detection pixels.
Masked pixels are used in pairs. When the scene is out of focus, the phase detection pixel mask phase shifts the incoming light slightly. The distance between phase detection pixels, combined with their relative shifts, can be convolved to give a determination of how far an optical assembly of an imaging device needs to move a lens to bring the scene into focus.